package assist.client.gwt.view.activity;

import assist.client.gwt.view.ClientFactory;
import assist.client.gwt.view.place.SelectGamesPlace;
import assist.client.gwt.view.ui.ShowGamesView;

/**
 * For views that are not part of the MVC Activity/Places.  There are views,
 * such as the ShowGamesView that are visible in the AppContainer, but are
 * not part of the views managed by the AppActivity.
 */
public class AppContainerPresenter implements ShowGamesView.Presenter
{
    private ClientFactory clientFactory;
    public AppContainerPresenter(ClientFactory clientFactory)
    {
        this.clientFactory = clientFactory;
    }

    @Override
    public void goToSelectGames()
    {        
        clientFactory.getPlaceController().goTo(
            new SelectGamesPlace(
                    this.clientFactory.getGamesProvider().getGamesQuery()));               
    }

}
